package com.lys.demo.dto;

import java.io.Serializable;
import java.util.Date;

import org.hibernate.validator.constraints.NotBlank;

import com.fasterxml.jackson.annotation.JsonView;

import io.swagger.annotations.ApiModelProperty;

public class UserInfo implements Serializable {

	private static final long serialVersionUID = 1L;

	public interface UserListView {};

	public interface UserDetailView extends UserListView {};

	@ApiModelProperty("用户ID")
	private long id;

	@ApiModelProperty("用户名")
	private String name;

	@NotBlank
	private String password;
	
	private Date createDate;

	@JsonView(UserListView.class)
	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}

	@JsonView(UserListView.class)
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@JsonView(UserDetailView.class)
	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	@JsonView(UserListView.class)
	public Date getCreateDate() {
		return createDate;
	}

	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}

}
